//
//  BasePublicClass.h
//  OvCloudProject
//
//  Created by wmwMAC on 16/10/19.
//  Copyright © 2016年 Jack. All rights reserved.
//

#import <Foundation/Foundation.h>

#import <UIKit/UIKit.h>


@interface BasePublicClass : NSObject


+ (NSString *)intervalSinceNow: (NSString *) theDate;
//随机数生成方法
+(NSInteger)getRandomNumber:(NSInteger)from to:(NSInteger)to;

//生成一定数量的随机数
+ (NSString *)returnSuijiNumWithcount:(NSInteger)Numcount from:(NSInteger)startNum To:(NSInteger)endNum;
//把数组或者字典转化成字符串
+ (NSString *)returnStringFromDicOrArray:(id)transData;
//获取时间戳字符串
+ (NSString *)getDataString;
//获取一个时间点字符串
+(NSString *)getTimeDataPointString;
//把json字符串转或成数组或者字典
+(id)parseJSONStringToNSDictionary:(NSString *)JSONString;

+(id)parseJsonDataToArrOrdic:(NSData *)tempdata;

//不使用代理的提示框
+(void)showPublicUI:(NSString *)describeStr weakself:(id)weakself;
//返回上一界面
+(void)showPublicUIAndBack:(NSString *)describeStr weakself:(UIViewController *)weakself;

//判断邮箱
+(BOOL)isValidateEmail:(NSString *)email;
//判断手机号码
+ (BOOL)isMobileNumber:(NSString *)mobileNum;
+(BOOL)isChinese:(NSString*)c;
//颜色
+(UIColor *)returnColorWithR:(NSInteger)Rcolor G:(NSInteger)Gcolor B:(NSInteger)Bcolor alpha:(CGFloat)alpha;


+(BOOL)isPureFloat:(NSString *)string;
+(BOOL)isPureInt:(NSString *)string;


//获取当前屏幕显示的viewcontroller
+ (UIViewController *)getCurrentVC;

//lable自适应长度
+ (CGFloat)weidthWithLabelText: (NSString *)text labelHeight: (CGFloat)labelHeight labelFont: (CGFloat)labelFont;
//lable自适应高度
+ (CGFloat)heightWithLabelText: (NSString *)text labelWidth: (CGFloat)labelWidth labelFont: (CGFloat)labelFont;

@end
